/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * EditorBase.java
 *
 * Created on 4/11/2009, 03:27:37 PM
 */

package pradoeditor.editors;

import com.vlsolutions.swing.docking.DockKey;
import com.vlsolutions.swing.docking.Dockable;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import javax.swing.JEditorPane;
import javax.swing.JScrollPane;
import jsyntaxpane.DefaultSyntaxKit;
import pradoeditor.comun.ItemProject;

/**
 *
 * @author jaimeg
 */
public abstract class Editor extends javax.swing.JPanel implements Dockable
{
    protected DockKey key;
    private ItemProject itemProject;

//    final Container container;
//    final JEditorPane codeEditor;
//    final JScrollPane scrPane;

    /** Creates new form EditorBase */
    public Editor()
    {
        initComponents();

        //container = this.getContentPane();
        //container.setLayout(new BorderLayout());

        //DefaultSyntaxKit.initKit();

        //codeEditor = new JEditorPane();
        //scrPane = new JScrollPane(codeEditor);
        //container.add(scrPane, BorderLayout.CENTER);
        //container.doLayout();
    }

    public DockKey getDockKey()
    {
        return key;
    }

    public Component getComponent()
    {
        return this;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @return the itemProject
     */
    public ItemProject getItemProject()
    {
        return itemProject;
    }

    /**
     * @param itemProject the itemProject to set
     */
    public void setItemProject(ItemProject itemProject)
    {
        this.itemProject = itemProject;
    }


    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables

}
